import { http } from '@/utils/request'
import type { Trivia, ApiResponse } from '@/types'

// 获取冷知识
export const getTrivia = (params?: {
  category?: string;
  artistId?: number;
  limit?: number;
}): Promise<ApiResponse<Trivia[]>> => {
  return http.get('/client/trivia', { params })
}

// 获取随机冷知识
export const getRandomTrivia = (): Promise<ApiResponse<Trivia>> => {
  return http.get('/client/trivia/random')
}

// 获取艺人相关冷知识
export const getArtistTrivia = (artistId: number): Promise<ApiResponse<Trivia[]>> => {
  return http.get(`/client/trivia/artist/${artistId}`)
} 